/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dice;

import java.util.Random;

/**
 *
 * @author walkerp
 */
public enum Die {
    D4(1,4),
    D6(1,6),
    D8(1,8),
    D12(1,12),
    TWO_D12(2,24);
    
    private static Random random = new Random();
    private int min, max;
    
    private Die(int min, int max) {
        this.min = min;
        this.max = max;
    }
    
    public int roll() {
        return min + random.nextInt(max - (min - 1));
    }
}
